<template>
	<view class="rich-text-page">
		<!-- <view class="title">{{ title }}</view> -->

		<view class="sub-title-time">
			<view class="sub-title">
				<!-- {{ subTitle }} -->
			</view>
			<view class="time">{{ time }}</view>
		</view>
		<view style="height: 25rpx;">

		</view>

		<view class="content" v-html="content"></view>

	</view>
</template>

<script>
	import {
		Aboutlist
	} from '@/utils/user.js'
	export default {
		data() {
			return {
				title: '这是标题',
				content: '',
				subTitle: '',
				time: ''


			}
		},

		onLoad(options) {
			this.out(options.id)


		},
		methods: {

			out(e) {

				var data = {
					type: e
				}
				Aboutlist(data).then(res => {

					console.log('res：', res);

					this.time = res.data.data.create_date,
						this.content = res.data.data.content
					this.getnavtitle(res.data.data.title)
				}).catch(error => {
					console.error('Init 方法执行出错：', error);
				});

			},

			getnavtitle(e) {

				uni.setNavigationBarTitle({
					title: e
				});


			},



		}
	}
</script>

<style>
	.rich-text-page {
		padding: 20px;
		font-family: 'Arial', sans-serif;
	}

	.title {
		font-size: 36rpx;
		color: #333;
		font-weight: 600;
		text-align: center;
		margin-bottom: 10px;
	}

	.content {
		margin-bottom: 20px;
		line-height: 1.6;
	}

 
	 
	.sub-title-time {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.sub-title {
		font-size: 18px;
		color: #666;
	}

	.time {
		font-size: 14px;
		color: #999;
	}
</style>